//
//  IDDCacheManager.h
//  ComJia
//
//  Created by Aslan on 17/02/2017.
//  Copyright © 2017 ComJia. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "IDDCacheManagerProtocol.h"
#import "IDDError+LocalCache.h"

extern NSString *const IDDErrorCacheDomain;

typedef NS_ENUM(NSInteger, IDDCacheManagerStrategy) {
    IDDCacheManagerStrategyUnknown,
    IDDCacheManagerStrategyWriteBack,
    IDDCacheManagerStrategyWriteThrough
};

@interface IDDCacheManager : NSObject<IDDCacheManagerProtocol>

@property (nonatomic, readonly) IDDCacheManagerStrategy strategy;
@property (nonatomic, assign) BOOL callbackInMainThread;

+ (void)setURLCacheStrategy:(IDDCacheManagerStrategy)strategy;

+ (void)setObjectCacheStrategy:(IDDCacheManagerStrategy)strategy;

+ (IDDCacheManager *)sharedURLCacheManager;

+ (IDDCacheManager *)sharedObjectCacheManager;

@end
